//异常类

class Exceptions {
    constructor() {

    }

    //抛出错误
    throwError(opts){
        const {msg} = opts;
        // throw new Error('clearStorage');
        return {
            success: false,
            msg: msg
        }
    }

    //抛出错误
    success(opts){
        const {data} = opts;
        return {
            success: false,
            msg: '成功',
            data: data
        }
    }

}
export default new Exceptions()